# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=pipewire-media-session
pkgver=0.4.1
pkgrel=0
pkgdesc="Low-latency audio/video router and processor - Session manager"
url="https://pipewire.org/"
# s390x blocked by pipewire
arch="all !s390x"
license="LGPL-2.1-or-later"
makedepends="
	alsa-lib-dev
	dbus-dev
	doxygen
	meson
	pipewire-dev>=0.3.39
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/PipeWire/media-session/-/archive/$pkgver/media-session-$pkgver.tar.gz"
options="!check" # No tests
builddir="$srcdir/media-session-$pkgver"

provides="pipewire-session-manager"
provider_priority=1
replaces="pipewire-media-session<0.3.39 pipewire-pulse<0.3.39 pipewire-jack<0.3.39 pipewire-alsa<0.3.39 pipewire-spa-bluez<0.3.39"

build() {
	abuild-meson \
		-Ddocs=enabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
sha512sums="
bfce472b7260b280c0d3cd74d917f48655b5be9976c89a109e94b81af2c3664e83446e97db573cedba6e5d54dedf77195b80eb0a76f6bfc0e96e342557469f99  pipewire-media-session-0.4.1.tar.gz
"
